#ifndef __LOG_H__
#define __LOG_H__

#include <stdio.h>
#include<stdlib.h>
#include<time.h>
#include<io.h>
#include<string.h>

typedef struct log
{
	double time;
	char * content;
	struct log * next;
	struct log * last;
}Log;

typedef struct auth
{
	char * name;
	char * time;
	char * title;
}Auth;

typedef struct list
{
	Auth * auth;
	Log * log;
	struct list * last;
	struct list * next;
}List;

typedef void * (* readBlock) (const char *, List **);

char * getTime();

List * loadLog(char * path);

void addList(List * head, List * node);

Log * createLog();

void writeList(char * path, List * begin, List * end);

void writeLog(char * path, Log * begin, Log * end);

void addLog(Log * head, Log * log);

void * readAuth(const char * line, List ** p);
void * readLog(const char * line, List ** p);

#endif // ! __LOG_H__